'''
* This is the projet for Brtc LlmOps Platform
* @Author Leon-liao <liaosiliang@alltman.com>
* @Description //TODO 
* @File: 1_search_tool_call.py
* @Time: 2025/10/15
* @All Rights Reserve By Brtc
'''
import json

from langchain_community.tools import DuckDuckGoSearchRun
from langchain_core.utils.function_calling import convert_to_openai_tool

search = DuckDuckGoSearchRun()

#print(search.invoke("langchain最新版本是那一个？"))

print("工具名字:", search.name)
print("工具描述:", search.description)
print("工具参数:", search.args)
print("工具是否直接返回:", search.return_direct)
print(convert_to_openai_tool(search))
